#include <Windows.h>
#include <psapi.h>
#pragma comment(lib, "psapi.lib")

#pragma once

#define PAGE_SIZE 4096

extern DWORD ScanFrom, ScanTo;

typedef struct _SCANNED_PAGE {
	ULONG_PTR PageAddress;
	ULONG PageSize;
} SCANNED_PAGE, *PSCANNED_PAGE;

enum eValueType{
	Byte,
	Word,
	Dword,
	Qword,
	Float,
	Double,
	Text
};

enum eScanType{
	ExactValue,
	DecreasedValue,
	IncreasedValue,
	BiggerThan,
	SmallerThan,
	UnknownInitialValue
};

class cMemoryScan{
	public:
		DWORD SearchMemory(DWORD From, DWORD To,LPVOID ValAddr, eValueType ValueType);
		VOID ScanPages();

		DWORD StaticPagesCount;
		DWORD PagesCount;
		bool CaseSensitive;
		DWORD CaseSensitiveVal;
		SCANNED_PAGE *ScannedPages;
		bool HexValue;
		bool WasUIV;
		cMemoryScan()
		{
			HexValue = 0;
			CaseSensitiveVal = 0x20;
			WasUIV = false;
		}
	private:
		
		DWORD ScannedPagesSize;
};